const path = require("path")
const fs = require('fs')

const prjList = ['home', 'news', 'weather']
const manifest = {
    projects: []
}
prjList.forEach(prj => {
    let version = require(path.join(__dirname, '..', prj, 'package.json')).deploy.version
    manifest.projects.push({
        name: prj,
        version: version
    })
})

let manifestDeployPath = path.join(__dirname, "../../../../book-to-be-big-fe-deploy/manifest.json")
fs.writeFileSync(manifestDeployPath, JSON.stringify(manifest, null, 2))